<template>
  <div class="content">
    <BreadNav
      :location="location"
      :routers="routers"
    />
    <main>
      <article>
        <ArticleContent />
      </article>
      <aside>
        <AsideLinks />
      </aside>
    </main>
    <Footer />
  </div>
</template>

<script>
import BreadNav from '@/components/BreadNav.vue'
import ArticleContent from '@/components/ArticleContent.vue'
import AsideLinks from '@/components/AsideLinks.vue'
import Footer from '@/components/Footer.vue'
export default {
  components: {
    BreadNav,
    Footer,
    ArticleContent,
    AsideLinks
  },
  data() {
    return {
      location: '语录簿',
      routers: 'yulubu'
    }
  },
  created() {
    this.$router.push({
      path: '/yulubu',
      query: {
        id: this.$route.query.id || 22
      }
    })
    // this.$router.go(0);
  }
}
</script>

<style lang="scss" scoped>
// 宽度大于1201px时
@media screen and (min-width: 1201px) {
  .content {
    width: 1200px;
    margin: 0 auto;
  }
}

// 宽度小于1200px时
@media screen and (max-width: 1200px) {
  .content {
    margin: 0 40px;
  }
}

@media only screen and (max-width: 768px) {
  body .content main article {
    width: 100%;
  }
  aside {
    display: none;
  }
}

@media only screen and (max-width: 480px) {
  .content {
    margin: 0 15px;
  }
}

.content {
  main {
    display: flex;
    article {
      width: 860px;
    }
    aside {
      width: 320px;
      margin-left: 20px;
      height: 300px;
      border-radius: 3px;
    }
  }
}
</style>
